-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support folding code blocks #679
Conversation
Pull Request Test Coverage Report for Build 5665540687
💛 - Coveralls |
Possible regression: #508 |
I like this feature. While it just does not work with tabs. Non-default tab(s) is not folded. Is it designed on purpose? |
@PeichengLiu If a code block is within hidden tabs, the browser is unaware of the size of the code block (since it hasn't been rendered), so it doesn't know whether it exceeds the preset length and should be folded. |
@stevenjoezhang True, while we can still fold the code on the fly based on the following event dispatched every time a tab gets switched. hexo-theme-next/source/js/utils.js Lines 225 to 228 in 408c1fa
Please take this as a sample, I'm happy to create a pull request. |
@PeichengLiu Thanks, pull requests are welcomed! |
PR Checklist
PR Type
What is the current behavior?
Issue resolved: #178
See also theme-next/hexo-theme-next#1732
What is the new behavior?
How to use?
In NexT
_config.yml
: